Zepto(function(){
   

	   /*禁止默认拖动事件*/
		document.body.addEventListener('touchmove', function (e) {
		  e.preventDefault(); //阻止默认的处理方式(阻止下拉滑动的效果)
		}, {passive: false}); //兼容ios和android



	    
	   window.onload=function(){
	      loaded();
		  var myScroll;
		  var isDating=true;
		  var tjList=[];
		  var allListFlag=false;
		  var times=0;
		  var closeTime=0;
          loadedIscrollo("#wrapper", "wrapper", myScroll, 0, 1, 1);
		  
		  $(".quesBox").tap(function(){
			  if(allListFlag==false){
				  $(".question_tm").forEach(function(item,index){
						tjList[index]={
						  tid:$(".question_tm").eq(index).attr("tid"),
						  k:""
						};
				  });
				  allListFlag=true;
			  }
		  });
		  
		  document.addEventListener("visibilitychange",function(){
			  if (document.tVisibilityState =='hidden') {
				  closeTime = Date.now();
				} else {
				  times = times - (Date.now() - closeTime)/1000;
				}
		  }); 
		  
		  
		  $(window).delegate(".question_xx","tap",function(){
			  let _that=this;
			  if(parseInt($(this).parent().parent().attr("index")) < (tjList.length-1)){
				  $(".quesBox").css("left",'-'+((parseInt($(this).parent().parent().attr("index"))+1)*$(this).width())+'px');
			  }else{
				  $(".tjdj_btn").removeClass("hide");
				  $(".sm_tips").removeClass("hide");
			  }
			  if(!$(this).hasClass("focus")){
				  $(this).parent("div").find(".question_xx").removeClass("focus");
				  $(this).addClass("focus");
				  isDating=true;
				  tjList[$(this).parent().parent().attr("index")]={
					  tid:$(this).parent().parent().attr("tid"),
					  k:$(this).attr("k")
				  };
				  console.log(tjList);
				  if(tjList.length>0){
				  	 window.localStorage.setItem("tjList",JSON.stringify(tjList));
				  }else{
				  	 window.localStorage.setItem("tjList",JSON.stringify([]));
				  }
			  }
		  });
		  
		  var intDiff = parseInt(60*10);//倒计时总秒数量
		  var ntimer=setInterval(function(){
		   var date=new Date();
		   date.setMinutes(date.getMinutes()+10);
		   if(isDating==true && $(".timer").length>0){
		    timerDjs(intDiff,function(){//超时回调
		      $(".tjdj_btn").trigger("tap");
		     $(".tjdj_btn").addClass("hd").attr("disabled","disabled");
		     alert("答题结束！");
		    },date,times);
		    clearInterval(ntimer);
		   }
		  },1);
	   };

		if($(".timertext3")){
			$(".timertext3").text(getCurrentTime())
		}
	   setInterval(function (){
		   if($(".timertext3")){
			   $(".timertext3").text(getCurrentTime())
		   }
	   },1000);


});


